/*************************************************************************
> File Name: friend.h
> Author: hzy
> Created Time: 2023-08-11 10:36:06
> Description: 类友元函数
************************************************************************/
#ifndef _FRIEND_H_
#define _FRIEND_H_

#include <iostream>
using namespace std;

class Friend
{
private:
    int val;

public:
    Friend(int myval) : val(myval) {}

    void setNum(int myval) { val = myval; }
    int getNum() { return val; }

    friend void printNum(Friend obj);
};

void printNum(Friend obj);

#endif